package com.example.oldkingdom.entities;


import java.util.ArrayList;

import com.example.oldkingdom.base.worldObject;

public class spawner extends worldObject 
{
	public static ArrayList<spawner> allSpawners = new ArrayList<spawner>();
	public final static spawner appleTree = new appleTree().setName("AppleTree");
	public boolean active = false;
	public spawner()
	{
		allSpawners.add(this);
	}
	public void onEnterArea()
	{
		
	}
	public void onLeaveArea()
	{
		
	}
	public spawner setVisible(boolean visible)
	{
		Visible = visible;
		return this;
	}
	public spawner setName(String name)
	{
		_name = name;
		return this;
	}
	
	
	public static spawner getSpawner(String spawnerName)
	{
		for (spawner sp : allSpawners)
			if (sp.getName() == spawnerName)
				return sp;
		
		return null;
	}
	public boolean Visible = false;
	
}
